home *** CD-ROM | disk | FTP | other *** search
- #
- # You should assemble, compile, and link first so you can read the map file
- # and then put the appropriate address in the ENDCODE define found in the
- # C file. After setting the correct value recompile and link the modules again.
- #
- # DOS 3.0+ lets you use a .EXE device driver, if you want to create a .BIN or
- # .SYS file you should remove any references to DGROUP or segment directives
- # such as _DATA, _BSS or what ever you called them. This is so no fix-ups
- # are generated when using EXE2BIN to create the .BIN file.
-
-
- # Note: you will get a "No Stack" warning when linking just ignore it
- # unless of course you add a stack segment, I just put the stack in the
- # code segment so there is no defined stack segment directive.
-
- # The code containing the Header must be the first object file in the list
- # to be linked.
-
- driver.exe: driver.obj handler.obj
- tlink driver handler,driver,,\tc\lib\cs
-
- driver.obj: driver.asm
- tasm /m $*.asm
-
- handler.obj: handler.c
- tcc -c -ms $*.c
-
- # Once you are done add the line DEVICE=DRIVER.EXE to your CONFIG.SYS file
- # and just reboot. A word of warning, when testing the driver use a floppy,
- # if your driver crashes and you booted from your hard drive you won't be able
- # to reboot. You could specify DEVICE=B:DRIVER.EXE if your CONFIG.SYS file is
- # on your hard disk. If things don't work out just open the drive door when you
- # reboot, when DOS trys to load the driver and can't find it, it just displays
- # a message and continues on.
-